import { createI18n } from 'vue-i18n'
import enMessages from '../public/locales/en.json'
import zhMessages from '../public/locales/zh.json'

const i18n = createI18n({
  legacy: false, // Ensure Composition API mode
  locale: 'zh', // Set default locale to Chinese
  fallbackLocale: 'en', // Set fallback locale
  messages: {
    en: enMessages,
    zh: zhMessages
  }
})

export default i18n 